package com.hxc.common.Schedule;

import com.hxc.common.config.EmailConfig;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

import javax.annotation.Resource;

@Configuration
@EnableScheduling
public class TestSchedule {
    @Resource
    private EmailConfig emailConfig;

//    @Scheduled(cron = "0/10 * * * * *") // 每10秒触发
    //@Scheduled(cron ="0 0/1 * * * ?") // 每分钟触发
    public void testSchedule1() {
        System.out.println("邮箱配置:"+emailConfig);
    }
}
